package com.infore.dataReceiving;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import com.infore.dataReceiving.core.Air212InstructionsHandle;
import com.infore.dataReceiving.entity.air212.Test1;
import com.infore.dataReceiving.externalInterface.siteManage.ISiteManageService;
import com.infore.dataReceiving.repository.batch.DataBatchImplRepository;
import com.infore.dataReceiving.select.dto.QueryParamDto;
import com.infore.dataReceiving.thread.AsyncTaskService;
import com.infore.dataReceiving.util.JsonUtils;

@RunWith(SpringRunner.class)
@SpringBootTest
public class test {
	
	@Autowired
	private DataBatchImplRepository dataBatchImplRepository;
	
	@Autowired
	private AsyncTaskService asyncTaskService;
	
	@Test
	public void testHandle() {
		for (int i = 0; i < 20; i++) {
            asyncTaskService.executeAsyncTask(i);
        }
	}
	
	
	public void testHandle1() {
		List<Test1> testlList = new ArrayList<Test1>();
		Test1 t1 = new Test1();
		t1.setName("张三");
		t1.setSex("男");
		Test1 t2 = new Test1();
		t2.setName("李四");
		t2.setSex("男");
		Test1 t3 = new Test1();
		t3.setName("赵七");
		t3.setSex("男");
		testlList.add(t1);
		testlList.add(t2);
		testlList.add(t3);
		dataBatchImplRepository.batchSave(testlList);
	}

}
